//创建一个路由器，并暴露出去

//1.引入路由创建器
import {createRouter,createWebHistory} from 'vue-router'
//引入需要分配路由的组件
import Home from "@/components/Home.vue"
import About from '@/components/About.vue'
import News from '@/components/News.vue'

//2.创建
const router  =createRouter({
    history:createWebHistory(),
    routes : [
        {
            path:"/home",
            component:Home
        },
        {
            path:"/about",
            component:About
        },
        {
            path:"/news",
            component:News
        }
    ]
})
//3.暴露
export default router

